
BASIC= TMV_Vector.cpp TMV_VectorArith.cpp TMV_BaseMatrix.cpp TMV_Matrix.cpp TMV_MatrixArith_A.cpp TMV_MatrixArith_B.cpp TMV_MatrixArith_C.cpp TMV_MatrixArith_D.cpp TMV_MatrixArith_E.cpp TMV_Givens.cpp TMV_Householder.cpp TMV_LUDiv.cpp TMV_LUDiv_A.cpp TMV_LUDiv_B.cpp TMV_LUDiv_C.cpp TMV_QRDiv.cpp TMV_QRDiv_A.cpp TMV_QRDiv_B.cpp TMV_QRDiv_D.cpp TMV_QRDiv_E.cpp TMV_QRDiv_F.cpp TMV_QRPDiv.cpp TMV_QRPDiv_A.cpp TMV_SVDiv.cpp TMV_SVDiv_A.cpp TMV_SVDiv_B.cpp

DIAG= TMV_DiagMatrix.cpp TMV_DiagMatrixArith.cpp

TRI= TMV_TriMatrix.cpp TMV_TriDiv.cpp TMV_TriDiv_A.cpp TMV_TriDiv_B.cpp TMV_TriDiv_C.cpp TMV_TriDiv_D.cpp TMV_TriMatrixArith_A.cpp TMV_TriMatrixArith_B.cpp TMV_TriMatrixArith_C.cpp TMV_TriMatrixArith_D.cpp TMV_TriMatrixArith_E.cpp TMV_TriMatrixArith_F.cpp TMV_DiagTriArith.cpp

BAND= TMV_BandMatrix.cpp TMV_BandLUDiv.cpp TMV_BandLUDiv_A.cpp TMV_BandLUDiv_B.cpp TMV_BandQRDiv.cpp TMV_BandQRDiv_A.cpp TMV_BandQRDiv_B.cpp TMV_BandSVDiv.cpp TMV_BandSVDiv_A.cpp TMV_BandMatrixArith_A.cpp TMV_BandMatrixArith_B.cpp TMV_BandMatrixArith_C.cpp TMV_BandMatrixArith_D.cpp TMV_BandMatrixArith_E.cpp 

SYM= TMV_SymMatrix.cpp TMV_SymMatrixArith_A.cpp TMV_SymMatrixArith_B.cpp TMV_SymMatrixArith_C.cpp TMV_SymMatrixArith_D.cpp TMV_SymMatrixArith_E.cpp TMV_SymMatrixArith_F.cpp TMV_SymMatrixArith_G.cpp TMV_SymHouseholder.cpp TMV_SymLUDiv.cpp TMV_SymLUDiv_A.cpp TMV_SymLUDiv_B.cpp TMV_SymLUDiv_C.cpp TMV_SymCHDiv.cpp TMV_SymCHDiv_A.cpp TMV_SymCHDiv_B.cpp TMV_SymSVDiv.cpp TMV_SymSVDiv_A.cpp

SYMBAND= TMV_SymBandMatrix.cpp TMV_SymBandMatrixArith_A.cpp TMV_SymBandMatrixArith_B.cpp TMV_SymBandCHDiv.cpp TMV_SymBandCHDiv_A.cpp TMV_SymBandCHDiv_B.cpp TMV_SymBandSVDiv.cpp TMV_SymBandSVDiv_A.cpp

LIB= $(BASIC) $(DIAG) $(TRI)
SBLIB= $(BAND) $(SYM) $(SYMBAND)

TEST1=TMV_Test1.cpp TMV_TestVector.cpp TMV_TestMatrix.cpp TMV_TestMatrixDiv.cpp TMV_TestDiag.cpp TMV_TestDiagArith_A.cpp TMV_TestDiagArith_B1.cpp TMV_TestDiagArith_B2.cpp TMV_TestDiagDiv.cpp TMV_TestTri.cpp TMV_TestTriArith_A1.cpp TMV_TestTriArith_A2.cpp TMV_TestTriArith_B1.cpp TMV_TestTriArith_B2.cpp TMV_TestTriArith_C1.cpp TMV_TestTriArith_C2.cpp TMV_TestTriDiv.cpp 
TEST1a=TMV_Test1a.cpp TMV_TestVector.cpp TMV_TestMatrix.cpp TMV_TestMatrixDiv.cpp 
TEST1b=TMV_Test1b.cpp TMV_TestDiag.cpp TMV_TestDiagArith_A.cpp TMV_TestDiagArith_B1.cpp TMV_TestDiagArith_B2.cpp TMV_TestDiagDiv.cpp 
TEST1c=TMV_Test1c.cpp TMV_TestTri.cpp TMV_TestTriArith_A1.cpp TMV_TestTriArith_A2.cpp TMV_TestTriArith_B1.cpp TMV_TestTriArith_B2.cpp TMV_TestTriArith_C1.cpp TMV_TestTriArith_C2.cpp TMV_TestTriDiv.cpp 
TEST2=TMV_Test2.cpp TMV_TestBand.cpp TMV_TestBandArith_A.cpp TMV_TestBandArith_B1.cpp TMV_TestBandArith_B2.cpp TMV_TestBandArith_C1.cpp TMV_TestBandArith_C2.cpp TMV_TestBandArith_D1.cpp TMV_TestBandArith_D2.cpp TMV_TestBandDiv.cpp TMV_TestBandDiv_A.cpp TMV_TestBandDiv_B.cpp TMV_TestBandDiv_C.cpp TMV_TestBandDiv_D.cpp TMV_TestSym.cpp TMV_TestSymArith_A.cpp TMV_TestSymArith_B1.cpp TMV_TestSymArith_B2.cpp TMV_TestSymArith_C1.cpp TMV_TestSymArith_C2.cpp TMV_TestSymArith_D1.cpp TMV_TestSymArith_D2.cpp TMV_TestSymArith_E1.cpp TMV_TestSymArith_E2.cpp TMV_TestSymDiv.cpp TMV_TestSymDiv_A.cpp TMV_TestSymDiv_B.cpp TMV_TestSymDiv_C.cpp TMV_TestSymDiv_D.cpp TMV_TestSymDiv_E.cpp TMV_TestSymBand.cpp TMV_TestSymBandArith_A.cpp TMV_TestSymBandArith_B1.cpp TMV_TestSymBandArith_B2.cpp TMV_TestSymBandArith_C1.cpp TMV_TestSymBandArith_C2.cpp TMV_TestSymBandArith_D1.cpp TMV_TestSymBandArith_D2.cpp TMV_TestSymBandArith_E1.cpp TMV_TestSymBandArith_E2.cpp TMV_TestSymBandArith_F1.cpp TMV_TestSymBandArith_F2.cpp TMV_TestSymBandDiv.cpp TMV_TestSymBandDiv_A.cpp TMV_TestSymBandDiv_B.cpp TMV_TestSymBandDiv_C.cpp TMV_TestSymBandDiv_D.cpp TMV_TestSymBandDiv_E.cpp TMV_TestSymBandDiv_F.cpp
TEST2a=TMV_Test2a.cpp TMV_TestBand.cpp TMV_TestBandArith_A.cpp TMV_TestBandArith_B1.cpp TMV_TestBandArith_B2.cpp TMV_TestBandArith_C1.cpp TMV_TestBandArith_C2.cpp TMV_TestBandArith_D1.cpp TMV_TestBandArith_D2.cpp TMV_TestBandDiv.cpp TMV_TestBandDiv_A.cpp TMV_TestBandDiv_B.cpp TMV_TestBandDiv_C.cpp TMV_TestBandDiv_D.cpp 
TEST2b=TMV_Test2b.cpp TMV_TestSym.cpp TMV_TestSymArith_A.cpp TMV_TestSymArith_B1.cpp TMV_TestSymArith_B2.cpp TMV_TestSymArith_C1.cpp TMV_TestSymArith_C2.cpp TMV_TestSymArith_D1.cpp TMV_TestSymArith_D2.cpp TMV_TestSymArith_E1.cpp TMV_TestSymArith_E2.cpp TMV_TestSymDiv.cpp TMV_TestSymDiv_A.cpp TMV_TestSymDiv_B.cpp TMV_TestSymDiv_C.cpp TMV_TestSymDiv_D.cpp TMV_TestSymDiv_E.cpp 
TEST2c=TMV_Test2c.cpp TMV_TestSymBand.cpp TMV_TestSymBandArith_A.cpp TMV_TestSymBandArith_B1.cpp TMV_TestSymBandArith_B2.cpp TMV_TestSymBandArith_C1.cpp TMV_TestSymBandArith_C2.cpp TMV_TestSymBandArith_D1.cpp TMV_TestSymBandArith_D2.cpp TMV_TestSymBandArith_E1.cpp TMV_TestSymBandArith_E2.cpp TMV_TestSymBandArith_F1.cpp TMV_TestSymBandArith_F2.cpp TMV_TestSymBandDiv.cpp TMV_TestSymBandDiv_A.cpp TMV_TestSymBandDiv_B.cpp TMV_TestSymBandDiv_C.cpp TMV_TestSymBandDiv_D.cpp TMV_TestSymBandDiv_E.cpp TMV_TestSymBandDiv_F.cpp
#TEST3=TMV_Test3.cpp TMV_TestSmallMatrixArith_A1.cpp
#TEST3=TMV_Test3.cpp TMV_TestSmallVector.cpp TMV_TestSmallMatrix.cpp 
TEST3=TMV_Test3.cpp TMV_TestSmallVector.cpp TMV_TestSmallMatrix.cpp TMV_TestSmallMatrixA.cpp TMV_TestSmallMatrixB.cpp TMV_TestSmallMatrixArith_A1.cpp TMV_TestSmallMatrixArith_A2a.cpp TMV_TestSmallMatrixArith_A2b.cpp TMV_TestSmallMatrixArith_A2c.cpp TMV_TestSmallMatrixArith_A3a.cpp TMV_TestSmallMatrixArith_A3b.cpp TMV_TestSmallMatrixArith_A3c.cpp TMV_TestSmallMatrixArith_A4a.cpp TMV_TestSmallMatrixArith_A4b.cpp TMV_TestSmallMatrixArith_A4c.cpp TMV_TestSmallMatrixArith_A5a.cpp TMV_TestSmallMatrixArith_A5b.cpp TMV_TestSmallMatrixArith_A5c.cpp TMV_TestSmallMatrixArith_A6a.cpp TMV_TestSmallMatrixArith_A6b.cpp TMV_TestSmallMatrixArith_A6c.cpp TMV_TestSmallMatrixArith_B1.cpp TMV_TestSmallMatrixArith_B3a.cpp TMV_TestSmallMatrixArith_B3b.cpp TMV_TestSmallMatrixArith_B4a.cpp TMV_TestSmallMatrixArith_B4b.cpp TMV_TestSmallMatrixArith_B4c.cpp TMV_TestSmallMatrixArith_B5a.cpp TMV_TestSmallMatrixArith_B5b.cpp TMV_TestSmallMatrixArith_B5c.cpp TMV_TestSmallMatrixArith_B6a.cpp TMV_TestSmallMatrixArith_B6b.cpp TMV_TestSmallMatrix_Sub1.cpp TMV_TestSmallMatrix_Sub2.cpp TMV_TestSmallMatrix_Sub3.cpp TMV_TestSmallMatrix_Sub4.cpp TMV_TestSmallMatrix_Sub5.cpp
TEST3a=TMV_Test3a.cpp TMV_TestSmallVector.cpp TMV_TestSmallMatrix.cpp TMV_TestSmallMatrix_Sub1.cpp TMV_TestSmallMatrix_Sub2.cpp TMV_TestSmallMatrix_Sub3.cpp TMV_TestSmallMatrix_Sub4.cpp TMV_TestSmallMatrix_Sub5.cpp
TEST3b=TMV_Test3b.cpp TMV_TestSmallMatrixA.cpp TMV_TestSmallMatrixArith_A1.cpp TMV_TestSmallMatrixArith_A2a.cpp TMV_TestSmallMatrixArith_A2b.cpp TMV_TestSmallMatrixArith_A2c.cpp TMV_TestSmallMatrixArith_A3a.cpp TMV_TestSmallMatrixArith_A3b.cpp TMV_TestSmallMatrixArith_A3c.cpp TMV_TestSmallMatrixArith_A4a.cpp TMV_TestSmallMatrixArith_A4b.cpp TMV_TestSmallMatrixArith_A4c.cpp TMV_TestSmallMatrixArith_A5a.cpp TMV_TestSmallMatrixArith_A5b.cpp TMV_TestSmallMatrixArith_A5c.cpp TMV_TestSmallMatrixArith_A6a.cpp TMV_TestSmallMatrixArith_A6b.cpp TMV_TestSmallMatrixArith_A6c.cpp 
TEST3c=TMV_Test3c.cpp TMV_TestSmallMatrixB.cpp TMV_TestSmallMatrixArith_B1.cpp TMV_TestSmallMatrixArith_B3a.cpp TMV_TestSmallMatrixArith_B3b.cpp TMV_TestSmallMatrixArith_B4a.cpp TMV_TestSmallMatrixArith_B4b.cpp TMV_TestSmallMatrixArith_B4c.cpp TMV_TestSmallMatrixArith_B5a.cpp TMV_TestSmallMatrixArith_B5b.cpp TMV_TestSmallMatrixArith_B5c.cpp TMV_TestSmallMatrixArith_B6a.cpp TMV_TestSmallMatrixArith_B6b.cpp 

EX1= Vector.cpp
EX2= Matrix.cpp
EX3= Division.cpp
EX4= BandMatrix.cpp
EX5= SymMatrix.cpp

LIBFILE= $(LIBDIR)/libtmv.a
LIBS= -L$(LIBDIR) -ltmv $(BLASLIBS) -lm
SBLIBFILE= $(LIBDIR)/libtmv_symband.a
SBLIBS= -L$(LIBDIR) -ltmv_symband -ltmv $(BLASLIBS) -lm

LIB_O := $(patsubst %.cpp,$(SRCDIR)/%.o,$(LIB))
SBLIB_O := $(patsubst %.cpp,$(SRCDIR)/%.o,$(SBLIB))
TEST1_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST1))
TEST1a_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST1a))
TEST1b_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST1b))
TEST1c_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST1c))
TEST2_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST2))
TEST2a_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST2a))
TEST2b_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST2b))
TEST2c_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST2c))
TEST3_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST3))
TEST3a_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST3a))
TEST3b_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST3b))
TEST3c_O := $(patsubst %.cpp,$(TESTDIR)/%.o,$(TEST3c))
EX1_O := $(patsubst %.cpp,$(EXDIR)/%.o,$(EX1))
EX2_O := $(patsubst %.cpp,$(EXDIR)/%.o,$(EX2))
EX3_O := $(patsubst %.cpp,$(EXDIR)/%.o,$(EX3))
EX4_O := $(patsubst %.cpp,$(EXDIR)/%.o,$(EX4))
EX5_O := $(patsubst %.cpp,$(EXDIR)/%.o,$(EX5))

LIB_SRC := $(patsubst %.cpp,$(SRCDIR)/%.cpp,$(LIB))
SBLIB_SRC := $(patsubst %.cpp,$(SRCDIR)/%.cpp,$(SBLIB))
TEST1_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST1))
TEST1a_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST1a))
TEST1b_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST1b))
TEST1c_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST1c))
TEST2_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST2))
TEST2a_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST2a))
TEST2b_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST2b))
TEST2c_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST2c))
TEST3_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST3))
TEST3a_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST3a))
TEST3b_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST3b))
TEST3c_SRC := $(patsubst %.cpp,$(TESTDIR)/%.cpp,$(TEST3c))
EX1_SRC := $(patsubst %.cpp,$(EXDIR)/%.cpp,$(EX1))
EX2_SRC := $(patsubst %.cpp,$(EXDIR)/%.cpp,$(EX2))
EX3_SRC := $(patsubst %.cpp,$(EXDIR)/%.cpp,$(EX3))
EX4_SRC := $(patsubst %.cpp,$(EXDIR)/%.cpp,$(EX4))
EX5_SRC := $(patsubst %.cpp,$(EXDIR)/%.cpp,$(EX5))

libs: lib sblib

tests: test1 test2 test3

examples: vector matrix bandmatrix symmatrix division

all: libs tests examples

lib: $(LIBFILE)

sblib: $(SBLIBFILE)

test1: $(BINDIR)/tmvtest1

test1a: $(BINDIR)/tmvtest1a

test1b: $(BINDIR)/tmvtest1b

test1c: $(BINDIR)/tmvtest1c

test2: $(BINDIR)/tmvtest2

test2a: $(BINDIR)/tmvtest2a

test2b: $(BINDIR)/tmvtest2b

test2c: $(BINDIR)/tmvtest2c

test3: $(BINDIR)/tmvtest3

test3a: $(BINDIR)/tmvtest3a

test3b: $(BINDIR)/tmvtest3b

test3c: $(BINDIR)/tmvtest3c

vector: $(BINDIR)/vector

matrix: $(BINDIR)/matrix

bandmatrix: $(BINDIR)/bandmatrix

symmatrix: $(BINDIR)/symmatrix

division: $(BINDIR)/division


testclean:
	- $(RM) $(TESTDIR)/*.o $(TESTDIR)/.*.P $(BINDIR)/tmv* tmv*.dat
 
clean: testclean
	- $(RM) $(SRCDIR)/*.o $(SRCDIR)/.*.P $(EXDIR)/*.o $(EXDIR)/.*.P 

$(LIBFILE): $(LIB_O)
	$(AR) $(ARFLAGS) $@ $?
	$(RANLIB) $@

$(SBLIBFILE): $(SBLIB_O)
	$(AR) $(ARFLAGS) $@ $?
	$(RANLIB) $@

LIB_ALL= $(LIB) $(SBLIB) 
TEST_ALL= $(TEST1) $(TEST2) $(TEST3) 
EX_ALL= $(EX1) $(EX2) $(EX3) $(EX4) $(EX5)
LIB_P := $(patsubst %.cpp,$(SRCDIR)/.%.P,$(LIB_ALL)) 
TEST_P := $(patsubst %.cpp,$(TESTDIR)/.%.P,$(TEST_ALL)) 
EX_P := $(patsubst %.cpp,$(EXDIR)/.%.P,$(EX_ALL)) 
ALL_P= $(LIB_P) $(TEST_P) $(EX_P)
ALL_O= $(LIB_O) $(SBLIB_O) $(TEST1_O) $(TEST2_O) $(TEST3_O) $(EX1_O) $(EX2_O) $(EX3_O) $(EX4_O) $(EX5_O)

# Add in the SRCDIR to the includes for the .inst files
CFLAGS2= -I$(SRCDIR) $(CFLAGS) 
INCLUDE2= -I$(SRCDIR) $(INCLUDE)

# See http://make.paulandlesley.org/autodep.html for an explanation of 
# the following lines

.PRECIOUS: $(ALL_O)

-include $(ALL_P)

$(SRCDIR)/%.o : $(SRCDIR)/%.cpp
	$(CC) -c $(CFLAGS2) -o $@ $<
	@gcc -MM $(INCLUDE2) -o $*.d $<; \
	  $(RM) $(SRCDIR)/.$*.P; \
	  echo -n $(SRCDIR)/ > $(SRCDIR)/.$*.P; \
	  cat $*.d >> $(SRCDIR)/.$*.P; \
	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
	      -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(SRCDIR)/.$*.P; \
	  $(RM) $*.d

$(EXDIR)/%.o : $(EXDIR)/%.cpp
	$(CC) -c $(CFLAGS2) -o $@ $<
	@gcc -MM $(INCLUDE2) -o $*.d $<; \
	  $(RM) $(EXDIR)/.$*.P; \
	  echo -n $(EXDIR)/ > $(EXDIR)/.$*.P; \
	  cat $*.d >> $(EXDIR)/.$*.P; \
	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
	      -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(EXDIR)/.$*.P; \
	  $(RM) $*.d

$(TESTDIR)/%.o : $(TESTDIR)/%.cpp
	$(CC) -c $(CFLAGS2) -o $@ $<
	@gcc -MM $(INCLUDE2) -o $*.d $<; \
	  $(RM) $(TESTDIR)/.$*.P; \
	  echo -n $(TESTDIR)/ > $(TESTDIR)/.$*.P; \
	  cat $*.d >> $(TESTDIR)/.$*.P; \
	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
	      -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $(TESTDIR)/.$*.P; \
	  $(RM) $*.d

$(BINDIR)/tmvtest1: $(TEST1_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST1_O) $(LIBS)

$(BINDIR)/tmvtest1a: $(TEST1a_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST1a_O) $(LIBS)

$(BINDIR)/tmvtest1b: $(TEST1b_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST1b_O) $(LIBS)

$(BINDIR)/tmvtest1c: $(TEST1c_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST1c_O) $(LIBS)

$(BINDIR)/tmvtest2: $(TEST2_O) $(SBLIBFILE) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST2_O) $(SBLIBS)

$(BINDIR)/tmvtest2a: $(TEST2a_O) $(SBLIBFILE) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST2a_O) $(SBLIBS)

$(BINDIR)/tmvtest2b: $(TEST2b_O) $(SBLIBFILE) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST2b_O) $(SBLIBS)

$(BINDIR)/tmvtest2c: $(TEST2c_O) $(SBLIBFILE) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST2c_O) $(SBLIBS)

$(BINDIR)/tmvtest3: $(TEST3_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST3_O) $(LIBS)

$(BINDIR)/tmvtest3a: $(TEST3a_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST3a_O) $(LIBS)

$(BINDIR)/tmvtest3b: $(TEST3b_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST3b_O) $(LIBS)

$(BINDIR)/tmvtest3c: $(TEST3c_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(TEST3c_O) $(LIBS)

$(BINDIR)/vector: $(EX1_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(EX1_O) $(LIBS)

$(BINDIR)/matrix: $(EX2_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(EX2_O) $(LIBS)

$(BINDIR)/division: $(EX3_O) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(EX3_O) $(LIBS)

$(BINDIR)/bandmatrix: $(EX4_O) $(SBLIBFILE) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(EX4_O) $(SBLIBS)

$(BINDIR)/symmatrix: $(EX5_O) $(SBLIBFILE) $(LIBFILE)
	$(CC) $(CFLAGS) -o $@ $(EX5_O) $(SBLIBS)

